package com.shardingsphere.modules.controller;

import com.shardingsphere.modules.entity.Student;
import com.shardingsphere.modules.service.StudentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "对学生表CRUD")
@RestController
@RequestMapping("/student")
public class StudentController {

    @Resource
    private StudentService studentService;

    @ApiOperation(value = "查询学生列表")
    @GetMapping("/list")
    public List<Student> list() {
        return studentService.selectList();
    }

}
